<template>
    <div>
        <!-- seach区域 -->
        <div class="seach">
            <span class="seachStatus">
                {{$t('resconiliationdate')}}
                <el-date-picker :placeholder="$t('plsset')" v-model="rcpoolform.billingDate" width="20%" type="date" format="yyyy-MM-dd" value-format="yyyy-MM-dd" size="mini"></el-date-picker>
            </span>
            <span class="seachStatus">
                {{$t('trstyp')}}
                <el-select v-model="rcpoolform.tradeType" :placeholder="$t('plsset')" size="mini">
                    <el-option :label="$t('alltypes')" :value="-1"></el-option>
                    <el-option :label="$t('vlid')" :value="1"></el-option>
                    <el-option :label="$t('invlid')" :value="2"></el-option>
                </el-select>
            </span>
            <el-button type="primary" @click="seach" size="mini" v-preventReClick>{{$t('qury')}}</el-button>
        </div>
        <!-- 内容区域 -->
        <el-card class="cardBox">
            <el-table border style="width: 100%" :data="rcpoolList">
                <el-table-column type="index" :label="$t('sernum')">
                </el-table-column>
                <el-table-column prop="billingDate" :label="$t('resconiliationdate')">
                </el-table-column>
                <el-table-column prop="flowno" :label="$t('platformserialnum')">
                </el-table-column>
                <el-table-column prop="tradeAmount" :label="$t('trastamt')">
                </el-table-column>
                <el-table-column prop="tradeStatus" :label="$t('transstatus')">
                </el-table-column>
                <el-table-column prop="tradeType" :label="$t('trstyp')">
                </el-table-column>
                <!-- <el-table-column prop="address" :label="$t('opratn')" width="140">
                    <template slot-scope="scope">
                        <el-link type="primary" @click="showPower(scope.row)">原型上没画(1.10)</el-link>
                    </template>
                </el-table-column> -->
            </el-table>
            <!-- 分页 -->
            <el-pagination
                @size-change="handleSizeChange"
                @current-change="handleCurrentChange"
                :current-page="rcpoolform.pageNum"
                :page-sizes="[10, 15, 20, 30]"
                :page-size="rcpoolform.pageSize"
                layout="total, sizes, prev, pager, next, jumper"
                :total="total"
                :pager-count="5">
            </el-pagination>
        </el-card>
    </div>
</template>

<script>
import {
    getrcpoolchannellist
} from '@/libs/reqlist.js'
export default {
    data () {
        return {
            total: 0,
            rcpoolform: {
                billingDate: null,
                // tradeType: -1,
                pageSize: 10,
                pageNum: 1
            },
            rcpoolList: []
        }
    },
    methods: {
        seach () {
            this.getRcPoolList()
        },
        getRcPoolList () {
            getrcpoolchannellist(this.rcpoolform).then(res => {
                if (res.data.code === '000000') {
                    this.total = res.data.data.total - 0
                    this.rcpoolList = res.data.data.list
                } else {
                    this.$message.error('系统异常')
                }
            })
        },
        handleSizeChange (newSize) {
            this.cpequform.pageSize = newSize
            this.getCpEquList()
        },
        // 监听总页数变化
        handleCurrentChange (newNum) {
            this.cpequform.pageNum = newNum
            this.getCpEquList()
        }
    },
    mounted () {
        this.getRcPoolList()
    }
}
</script>

<style lang="less" scoped>
@import './bufpolData.less';
</style>
